import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },

  {path: '/custLogin',name: 'custLogin',component: ()=>import('../views/用户端/CustLogin.vue')},
  {path: '/custHome',
    name: 'custHome',
    component: ()=>import('../views/用户端/CustHome.vue'),
   // redirect:'/custLogin',
    children: [
        {path:'/custHome/custSession',component:()=>import('../views/用户端/CustSession.vue')},
    ]
  },
  {path:'/custSession',component:()=>import('../views/用户端/CustSession.vue')},
  {path:'/newSession',component:()=>import('../views/用户端/NewSession.vue')},

  {path:'/custOrder',component:()=>import('@/views/用户端/CustOrder.vue')},
  {path:'/custInfo',component:()=>import('@/views/用户端/CustInfo.vue')},
  {path:'/orderAndFeedback',component:()=>import('@/views/用户端/OrderAndFeedback.vue')},

  {path: '/empLogin',name: 'empLogin',component: ()=>import('../views/EmpLogin.vue')},
  {path: '/empHome',
    name: 'empHome',
    component: ()=>import('../views/EmpHome.vue'),
    //redirect: '/empLogin',
    children:[
      {path:'/empHome/dict',component:()=>import('@/views/管理端/数据字典/Dict.vue')},
      {path:'/empHome/dictOption',component:()=>import('@/views/管理端/数据字典/DictOption.vue')},
      {path:'/empHome/role',component:()=>import('@/views/管理端/用户角色/Role.vue')},
      {path:'/empHome/department',component:()=>import('@/views/管理端/部门管理/Department.vue')},
      {path:'/empHome/workRecord',component:()=>import('@/views/员工端/WorkRecord.vue')},
      {path:'/empHome/workManager',component:()=>import('@/views/管理端/工作记录管理/WorkManager.vue')},
      {path:'/empHome/empWorkManager',component:()=>import('@/views/员工端/EmpWorkManager.vue')},
      {path:'/empHome/equipmentType',component:()=>import('@/views/管理端/设备管理/EquipmentType.vue')},
      {path:'/empHome/equipment',component:()=>import('@/views/管理端/设备管理/Equipment.vue')},
      {path:'/empHome/sessionAndMessage',component:()=>import('@/views/管理端/会话管理/SessionAndMessage.vue')},
      {path:'/empHome/order',component:()=>import('@/views/管理端/订单管理/OrderManager.vue')},
      {path:'/empHome/customer',component:()=>import('@/views/管理端/客户管理/Customer.vue')},
      {path:'/empHome/employee',component:()=>import('@/views/管理端/员工管理/Employee.vue')},
      {path:'/empHome/contract',component:()=>import('@/views/管理端/合同管理/Contract.vue')},
      {path:'/empHome/coupon',component:()=>import('@/views/管理端/优惠券/Coupon.vue')},
      {path:'/empHome/feedback',component:()=>import('@/views/管理端/评价与反馈/Feedback.vue')},
      {path:'/empHome/empFeedback',component:()=>import('@/views/员工端/EmpFeedback.vue')},
      {path:'/empHome/consumables',component:()=>import('@/views/管理端/设备管理/Consumables.vue')},
      {path:'/empHome/dsService',component:()=>import('@/views/管理端/服务管理/DsService.vue')},
      {path:'/empHome/advertisement',component:()=>import('@/views/管理端/广告管理/Advertisement.vue')},
      {path:'/empHome/empSession',component:()=>import('@/views/员工端/EmpSession.vue')},
      {path:'/empHome/empOrder',component:()=>import('@/views/员工端/EmpOrder.vue')},
    ]

  },
 // {path: '/about', name: 'about', component: () => import( '../views/AboutView.vue')},
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
